package com.mini.cn.goods.io.netty.ws.info;

import lombok.Getter;
import lombok.Setter;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.LongAdder;

/**
 * Created with IntelliJ IDEA.

 * User: fly
 * Date: 2020-04-26
 * Time: 9:27 上午
 */
@Setter
@Getter
public class SessionUserInfo {
    private String userId;//用户id ip+port 127.0.0.1:8080_50030
    private String frontApp;//前端组件名称
    //比 AtomicLong 性能更好(减少乐观锁的重试次数)
    private LongAdder writeSeqId;//自己记录每次写id 有序唯一 方便离线的顺序消息
    //key 是消息唯一标示
    //private HashMap<String, FastPushMsg> requestLog;//每次请求的记录
    //private long lastPingTime;
    private ConcurrentHashMap<String, String> registerMsgMap;
    @Override
    public String toString() {
        return userId;
    }
}
